{extend name='main'}

{block name="content"}
<div class="think-box-shadow">
    <div class="layui-tab layui-tab-card think-bg-white">
        <ul class="layui-tab-title">
            {foreach ['index'=>'全部','is_examine'=>'待审核',
            'is_deleted'=>'回收站'] as $k=>$v}
            {if isset($typeOf) and $typeOf eq $k}
            <li class="layui-this" data-open="{:url('index')}?typeOf={$k}">{$v}</li>
            {else}
            <li data-open="{:url('index')}?typeOf={$k}">{$v}</li>
            {/if}{/foreach}
        </ul>
        <div class="layui-tab-content">
            {include file='user_car/search'}
            <table id="BaseData" data-url="{:sysuri()}" data-target-search="form.form-search"></table>
        </div>

        <table class="layui-table margin-top-10" lay-skin="line" lay-filter="test">
            {notempty name='list'}
            <thead>
            <tr>
                <th class='list-table-check-td think-checkbox'>
                    <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
                </th>
                <th class='list-table-sort-td'>
                    <button class="layui-btn layui-btn-xs" data-reload type="button">刷 新</button>
                </th>
                <th class='text-center'></th>
                <th colspan="10"></th>
            </tr>
            <tr>
                <th class='list-table-check-td think-checkbox'>
                    <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
                </th>
                <th width="" class='text-center nowrap'>车位号</th>
                <th width="" class='text-center nowrap'>姓名</th>
                <th width="" class='text-center nowrap'>电话</th>
                <th width="" class='text-center nowrap'>身份证号</th>
                <th width="" class='text-center nowrap'>车牌号</th>
                <th width="" class='text-center nowrap'>车辆类型</th>
                <th width="" class='text-center nowrap'>品牌</th>
                <th width="" class='text-center nowrap'>车系</th>
                <th width="" class='text-center nowrap'>车辆照片</th>
                <th width="" class='text-center nowrap'>审核状态</th>
                <th width="" class='text-center nowrap'>状态</th>
                <th width="" class='text-center nowrap'>操作</th>
            </tr>
            </thead>
            {/notempty}
            <tbody>
            {foreach $list as $key=>$vo}
            <tr>
                <td class='list-table-check-td think-checkbox'>
                    <label><input class="list-check-box" type='checkbox' value='{$vo.id}'></label>
                </td>
                <td class="text-center nowrap">{$vo.park|getPark}</td>
                <td class="text-center nowrap">{$vo.name|default=""}</td>
                <td class="text-center nowrap">{$vo.tel|default=""}</td>
                <td class="text-center nowrap">{$vo.id_card|default=""}</td>
                <td class="text-center nowrap">{$vo.number|default=""}</td>
                <td class="text-center nowrap">{$vo.type|default=""}</td>
                <td class="text-center nowrap">{$vo.brand|default=""}</td>
                <td class="text-center nowrap">{$vo.model|default=""}</td>
                <td class="text-center nowrap">
                    <img width="120" height="100" src='{$vo.image|default=""}' alt=""/>
                </td>
                <td class="text-center nowrap">
                    {eq name='vo.status' value='1'}<span class="layui-badge layui-bg-green">通过</span>{/eq}
                    {eq name='vo.status' value='0'}<span class="layui-badge layui-bg-orange">待审核</span>{/eq}
                    {eq name='vo.status' value='-1'}<span class="layui-badge layui-bg-red">未通过</span>{/eq}
                </td>
                <td class="text-center nowrap">
                    {eq name='vo.is_deleted' value='0'}<span class="layui-badge layui-bg-green">正常</span>{else}<span
                        class="layui-badge">已删除</span>{/eq}
                </td>
                <td class="text-center nowrap">
                    <a class="layui-btn layui-btn-sm layui-bg-blue" data-modal="{:url('user/detail')}?id={$vo.uid}"
                       data-title="查看业主信息" data-dbclick data-value="id#{$vo.uid}" data-csrf="{:systoken('user/detail')}">查看业主信息</a>
                    <!--{if $vo.status eq 0 and auth("examine")}-->
                    <a class="layui-btn layui-btn-sm" data-dbclick data-modal='{:url("examine")}?id={$vo.id}&uid={$vo.uid}' data-title="审核">审 核</a>
                    <!--{/if}-->

                    <!--{if auth("remove")}-->
                    <a class="layui-btn layui-btn-sm layui-btn-danger" data-action="{:url('remove')}"
                       data-value="id#{$vo.id};is_deleted#1" data-csrf="{:systoken('remove')}" data-confirm="确定要删除该项吗？">删 除</a>
                    <!--{/if}-->

                </td>
            </tr>
            {/foreach}
            </tbody>
            <script>
                layui.form.render();
            </script>
        </table>
    </div>

    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>

{/block}